package com.itheima.exer.exercise.ex0925;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;

public class NweDate1 {
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.of(2000,11,22,11,22,44);
        LocalDateTime now1 = LocalDateTime.of(2020,12,3,14,25,20);
        DateTimeFormatter date = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String format1 = now.format(date);
        System.out.println(format1);
        String str = "2012-12-12 12:12:12";
        System.out.println(LocalDateTime.parse(str, date));
        LocalDateTime.parse(str,date);
    }
}
